package com.example.api.model.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 库存记录
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class InventoryRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 库存记录id
     */
    private Integer id;

    /**
     * 商品名
     */
    private String name;

    /**
     * 数量
     */
    private Integer count;

    /**
     * 类型（0：出库；1：入库；）
     */
    private Integer type;

    /**
     * 描述
     */
    private String description;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date createTime;

    /**
     * 商品id
     */
    private Integer cid;

    /**
     * 仓库id
     */
    private Integer wid;

    /**
     * 商品
     */
    private List<Commodity> commodities;

    /**
     * 仓库
     */
    private List<Warehouse> warehouses;

}